use serde::{Deserialize, Serialize};

#[derive(sqlx::FromRow, Deserialize, Serialize)] 
pub struct LoginUserReq {
    pub phone: String,
    pub password:String,
    pub country:String,
}

#[derive(sqlx::FromRow, Deserialize, Serialize)] 
pub struct User {
    pub id: i64,
    pub nickname:String,
    pub password:String,
    pub token:String,
    pub avatar:String,
    pub state:i16,
    pub soft_delete: i16,
    pub follow_len:i64,
    pub like_len:i64,
    pub desec: String,
    pub creator_id:i64,
    pub withdrawal:i64,
    pub payable:i64,
    pub pending_cash:i64,
    pub balance:i64,
    pub country:String,
    pub phone:String,
    pub real_name:String,
    pub id_code:String,
    pub is_adult:i16,
    pub background:Option<Vec<String>>,
    pub role_id:i16,
    pub add_time: i64,
}